package com.bjdd.jdy.ui.Mine;

import com.bjdd.jdy.base.BaseResult;
import com.bjdd.jdy.entity.User;
import com.bjdd.jdy.entity.result.PerformanceResult;
import com.bjdd.jdy.util.Api;
import com.bjdd.jdy.util.RxSchedulers;

import rx.Observable;

/**
 * Created by Administrator on 2017/5/3.
 */

public class MineModel implements MineContract.Model {

    @Override
    public Observable<BaseResult<User>> getIserInfo(String token, String carrierId) {
        return Api.getInstance().service
                .getUserInfo(token,carrierId)
                .compose(RxSchedulers.io_main());
    }

    @Override
    public Observable<BaseResult<PerformanceResult>> performance(String token, String carrierId) {
        return Api.getInstance().service
                .performance(token,carrierId)
                .compose(RxSchedulers.io_main());
    }
}
